<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <base href="<%=basePath%>" target="_blank">
    <title>骑驴网-新闻频道</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="职场  公司 评论 薪水 新闻 时事">
	<meta http-equiv="description" content="中国最专业的职场交流中心">
	<link rel="icon" href="${pageContext.request.contextPath}/favicon.ico" type="image/x-icon"/>
	<link rel="shortcut icon" href="${pageContext.request.contextPath}/favicon.ico" type="image/x-icon"/>
	<link rel="stylesheet" type="text/css" href="css/main.css">
	<link rel="stylesheet" type="text/css" href="css/comm.css">
	<style type="text/css">
	body {
		color: #333;
	}
	img {
		margin: 0px;
		vertical-align: top;
	}
	#divtab {
		width: 100%;
		margin: 0px;
		height: 25px;
		line-height:25px;
		background-image: url("images/theme_blue.png");
		background-position: 0 -30;
		background-color: #E9EFF6;
		background-repeat: repeat-x;
		color: #1E50A2;
		font-weight: bold;
	}
	#divtab a {
		color: #1E50A2;
		text-decoration: none;
	}
	#divtab ul {
		list-style:none;
		margin:0px;
		padding:0px;
	}
	#divtab li {
		padding:0px 8px;
		margin:0px;
		font-size:14px;
		line-height: 25px;
		display:inline;
		height:25px;
		float: left;
		font-weight: bold;
		width: 94%;
	}
	.leftContent{
		height: 160px;
		overflow: hidden;
	}
	.leftContent div {
		height: auto;
	}
	#more {
		font-size:12px;
		font-weight:normal;
		float:right;
	}
	#more:hover {
		text-decoration: underline;
		color: red;
	}
	</style>
</head>

<body>
<%@include file="../header.jsp" %>
<center>
<div class="main">
<div class="search">
	<div style="float:left;">
		<img alt="骑驴网" src="images/qilv.png">
	</div>
	<div style="float:left;font-size:24px;font-weight:bold;padding:22px 0px 5px 15px;">
		新闻频道
	</div>
</div>
<div class="content" style="float:left;">
<div style="width:790px;height:auto;margin:0px;">
	<!-- Google News Element Code -->
	<div class="leftContent" style="width:99%;height:auto;border:0px;display:none;">
		<iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style="border:0;margin:0;width:300px;height:250px;" src="http://www.google.com/uds/modules/elements/newsshow/iframe.html?rsz=large&format=300x250&element=true" scrolling="no" allowtransparency="true"></iframe>
		<iframe frameborder=0 marginwidth=0 marginheight=0 border=0 style="border:0;margin:0;width:300px;height:250px;" src="http://www.google.com/uds/modules/elements/newsshow/iframe.html?rsz=large&format=300x250&topic=w&element=true" scrolling="no" allowtransparency="true"></iframe>
	</div>	

	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
				<li id="tab21">
					<a href="pages/news/newspagelist.jsp?topic=w" id="more">更多</a>
					<a href="javascript:;" target="_self">国际新闻</a></li>
			</ul>
		</div>
		<div id="tabDiv31"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
				<li id="tab21">
				<a href="pages/news/newspagelist.jsp?topic=n" id="more">更多</a>
				<a href="javascript:;" target="_self">国内新闻</a></li>
			</ul>
		</div>
		<div id="tabDiv32"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
				<li id="tab21">
					<a href="pages/news/newspagelist.jsp?topic=p" id="more">更多</a>
					<a href="javascript:;" target="_self">国家政策</a>
				</li>
			</ul>
		</div>
		<div id="tabDiv33"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
				<li id="tab21">
					<a href="pages/news/newspagelist.jsp?topic=b" id="more">更多</a>
					<a href="javascript:;" target="_self">财经新闻</a>
				</li>
			</ul>
		</div>
		<div id="tabDiv34"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
			<li id="tab21">
				<a href="pages/news/newspagelist.jsp?topic=s" id="more">更多</a>
				<a href="javascript:;" target="_self">体育新闻</a>
			</li>
			</ul>
		</div>
		<div id="tabDiv41"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
			<li id="tab42">
				<a href="pages/news/newspagelist.jsp?topic=e" id="more">更多</a>
				<a href="javascript:;" target="_self">娱乐新闻</a>
			</li>
			</ul>
		</div>
		<div id="tabDiv42"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
			<li id="tab43">
				<a href="pages/news/newspagelist.jsp?topic=m" id="more">更多</a>
				<a href="javascript:;" target="_self">健康健身</a>
			</li>
			</ul>
		</div>
		<div id="tabDiv43"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
	
	<div class="leftContent" style="height:270px;">
		<div id="divtab">
			<ul>
			<li id="tab44">
				<a href="pages/news/newspagelist.jsp?topic=t" id="more">更多</a>
				<a href="javascript:;" target="_self">电脑科技</a>
			</li>
			</ul>
		</div>
		<div id="tabDiv44"><img src="images/icon/loading.gif">数据采集中...</div>
	</div>
</div>
</div>
<div style="width:180px;height:auto;margin:0px;float:right;">
	<div class="rightContent">
	<div id="divtab" style="color:#1E50A2;font-weight:bold;">
		广告推广
	</div>
	</div>
	<div class="rightContent" style="background-color:#F7FAFC;">
		<div id="divtab" style="color:#1E50A2;font-weight:bold;">
			股票实时指数
		</div>
		<div style="height:auto;width:96%;margin:0px;padding:0px;padding:0px;">
			<iframe src="http://www.thinkpage.cn/stock/widget.htm?mo=1&or=1&an=1" style="padding:4px;" frameborder="0" scrolling="no" width="176" height="200" allowTransparency="true"></iframe>
		</div>
	</div>
	<div class="rightContent">
		<!-- 天气预报 -->
		<div id="hotKeywords" style="height:auto;width:95%;margin:0px;padding:0px;overflow:hidden;background-color:">
			<iframe src="http://www.thinkpage.cn/weather/weather.aspx?uid=&c=CHXX0099&l=zh-CHS&p=CMA&a=1&u=C&s=1&m=1&x=1&d=3&fc=&bgc=&bc=&ti=1&in=1&li=2&ct=iframe" frameborder="0" scrolling="no" width="176" height="260" allowTransparency="true"></iframe>
		</div>
	</div>
	<div class="rightContent">
	<div id="divtab" style="color:#1E50A2;font-weight:bold;">
		广告推广
	</div>
	</div>

</div>
</div>
<%@include file="../tailer.jsp" %>
</center>
</body>
<script type="text/javascript" src="js/javer.js"></script>
<script type="text/javascript" src="js/tabview.js"></script>
<script type="text/javascript">	

	function findCompa(name, tar) {
		name = name || "";
		tar = tar || "_blank";
		name = encodeURIComponent(encodeURIComponent(name));
		window.open("../../company.html?method=findCompany&name=" + name, tar, "");
	}

	// Google 新闻
	
	// RFC #822 DATE AND TIME SPECIFICATION
	var month = {
		 "Jan": "1",
		 "Feb": "2",
		 "Mar": "3",
		 "Apr": "4",
         "May": "5",
         "Jun": "6",
         "Jul": "7",
         "Aug": "8",
         "Sep": "9",
         "Oct": "10",
         "Nov": "11",
         "Dec": "12"
	};
	
	function createNewItem(res) {
		var r = res.responseData.results;
		var dis = "<ul class='newsUL'><li style='height:5px;'></li>";
		for (var i = 0; i < r.length; i++) {
			var publishDate = r[i].publishedDate; // Wed, 27 Jul 2011 19:24:01 -0700
			publishDate = parseDate(publishDate);
			dis += "<li class='newsLI'><a href="+ r[i].unescapedUrl +" style='float:left;'>"+ r[i].title.substring(0,22) +"</a>&nbsp;"+ publishDate +"";
			
			if (i < r.length -1) {
				dis += "<p style='padding:0px;margin:6px;border:0px;border-top:1px dashed #DDD;clear:both;'></p>";
			}
			dis += "</li>";
		}
		dis += "</ul>";
		return dis;
	}
	function parseDate(date) {
		var ts = date.split(" ");
		var res = month[ts[2]] + "月" + ts[1] + "日 ";// + ts[4];
		return res;
	}

	function doWorldNews(res) {
		$("tabDiv31").html(createNewItem(res));
	}
	function doNationNews(res) {
		$("tabDiv32").html(createNewItem(res));
	}
	function doPoliticNews(res) {
		$("tabDiv33").html(createNewItem(res));
	}
	function doSportNews(res) {
		$("tabDiv41").html(createNewItem(res));
	}
	function doEntertNews(res) {
		$("tabDiv42").html(createNewItem(res));
	}
	function doHealNews(res) {
		$("tabDiv43").html(createNewItem(res));
	}
	function doBusinessNews(res) {
		$("tabDiv34").html(createNewItem(res));
	}
	function doTechNews(res) {
		$("tabDiv44").html(createNewItem(res));
	}
</script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=w&rsz=8&callback=doWorldNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=n&rsz=8&callback=doNationNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=p&rsz=8&callback=doPoliticNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=s&rsz=8&callback=doSportNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=e&rsz=8&callback=doEntertNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=m&rsz=8&callback=doHealNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=b&rsz=8&callback=doBusinessNews&ned=cn"></script>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/services/search/news?&v=1.0&topic=t&rsz=8&callback=doTechNews&ned=cn"></script>
</html>
